<template>
	<div>
		<h1>{{msg}}</h1>
		<button @click="reverseStr">点击进行反转</button>
	</div>
</template>

<script>
export default {
	data() {
		return {
			msg: 'hello,world!'
		}
	},
	methods: {
		// 翻转字符串
		reverseStr() {
			this.msg = this.msg.split('').reverse().join('')
		}
	}
};
</script>

<style>
</style>